package com.koron.sinoprobe.web.ledger.bean.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.koron.sinoprobe.web.common.DeleteFlag;
import com.koron.sinoprobe.web.common.UpdateParameter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel(description = "专项项目")
public class SpProject implements Serializable, UpdateParameter, DeleteFlag {
    private static final long serialVersionUID = -83413721893955312L;

    @ApiModelProperty("主键")
    private String id;

    @ApiModelProperty("w_sp_plan.id，用于记录项目来源")
    private String planId;

    @ApiModelProperty("名称")
    private String name;

    @ApiModelProperty("编号")
    private String code;

    @ApiModelProperty("业务类别: 专项管理.biz_category")
    private String bizCategory;

    @ApiModelProperty("项目类别：专项管理.sp_project_category")
    private String projectType;

    @ApiModelProperty("计划专业：专项管理.sp_major_category")
    private String major;

    @ApiModelProperty("计划来源，专项管理.plan_source")
    private String planSource;

    @ApiModelProperty("重要程度：专项管理.important_level")
    private String importantLevel;

    @ApiModelProperty("主办部门id")
    private String hostDeptId;

    @ApiModelProperty("主办部门名称")
    private String hostDeptName;

    @ApiModelProperty("主办单位id")
    private String hostOrgId;

    @ApiModelProperty("主办单位名称")
    private String hostOrgName;

    @ApiModelProperty("计划开始时间，yyyy-mm-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date predictStartTime;

    @ApiModelProperty("计划完成时间，yyyy-mm-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date predictFinishTime;

    @ApiModelProperty("验收标准（已废弃），这里作为是否滞后使用 sp_progress_status")
    private String acceptCriteria;

    @ApiModelProperty("项目内容概述")
    private String contentOverview;

    @ApiModelProperty("是否团队")
    private Integer isTeam;

    @ApiModelProperty("负责人账号")
    private String leader;

    @ApiModelProperty("负责人名字")
    private String leaderName;

    @ApiModelProperty("是否计划内")
    private Integer isExpected;

    @ApiModelProperty("当前里程碑")
    private String currMilestone;

    @ApiModelProperty("项目进度，从项目汇报中同步，没有项目汇报时为0，单位：%")
    private Integer progress;

    @ApiModelProperty("计划预算资金,单位：元")
    private BigDecimal budget;

    @ApiModelProperty("预算类型，字典：budget_type")
    private String budgetType;

    @ApiModelProperty("项目状态：专项管理.sp_project_status")
    private String status;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("必要性")
    private String necessity;

    @ApiModelProperty("可行性")
    private String feasibility;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("创建人账号")
    private String createBy;

    @ApiModelProperty("创建人名字")
    private String createByName;

    @ApiModelProperty("更新时间")
    private Date updateTime;

    @ApiModelProperty("更新人账号")
    private String updateBy;

    @ApiModelProperty("更新人名字")
    private String updateByName;

    @ApiModelProperty("创建部门")
    private String deptId;

    @JsonIgnore
    @ApiModelProperty(value = "删除标志：0-未删除,1-已删除", hidden = true)
    private Boolean deleteFlag;

    @ApiModelProperty(value = "所属年份：字符串类型")
    private String belongYear;

    @ApiModelProperty(value = "终结原因")
    private String reason;

    @ApiModelProperty("项目状态：里程碑状态")
    private String milestoneStatus;

    @ApiModelProperty("更新状态标识")
    private Boolean updateFlag = false;
}
